<template>
  <div id="home" class="showerBack">
    <canvas id="galaxy"></canvas>
  </div>
</template>

<script>
import { drawGalaxy } from './js/home4'
import { getArticleTypeListApi } from '@/api/home/home'

export default {
  name: 'home',
  mounted () {
    this.articleType()
  },
  methods: {
    async articleType () {
      let res = await getArticleTypeListApi({}, true)
      drawGalaxy(res.data)
    }
  }
}
</script>

<style scoped lang="scss">
#home {
  height: 100%;
  width: 100%;
  #galaxy {
    background: linear-gradient(to top right, black, #181a56 50%, #0a30a3 10%, #181a56 50%, black);
    height: 100%;
    width: 100%;
  }
  .none {
    display: none;
  }
}
</style>
